﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ArgusLight.Fractals2D.ComplexFractalColoring.RouteLengthBased
{
	public class all_colors : Coloring
	{
		public override Color GetColor(int x, int y)
		{
			base.GetColor(x, y);
			byte[] a = GetBytes_Sinus3(this.data.iterations[x, y], this.fractalParameter.Iterations, this.data.routeLength[x, y], this.parameter.Frequency, this.parameter.Translation);
			return Color.FromArgb(255, a[0], a[1], a[2]);
		}
	}

	[Alpha()]
	public class test : Coloring
	{
		public override Color GetColor(int x, int y)
		{
			Color c = base.GetColor(x, y);
			if (this.data.iterations[x, y] >= this.fractalParameter.Iterations)
				return Colors.Black;
			byte[] a = GetBytes_Sinus2(this.data.iterations[x, y], this.fractalParameter.Iterations, this.data.routeLength[x, y], this.parameter.Frequency, this.parameter.Translation);
			return c.FromHSV(this.data.z[x, y].Phase * 180 / Math.PI + 180, a[0] / 255.0, a[1] / 255.0);
		}
	}

	[Alpha()]
	public class test2 : Coloring
	{
		public override Color GetColor(int x, int y)
		{
			Color c = base.GetColor(x, y);
			if (this.data.iterations[x, y] >= this.fractalParameter.Iterations)
				return Colors.Black;
			byte[] a = GetBytes_Sinus2(this.data.iterations[x, y], this.fractalParameter.Iterations, this.data.routeLength[x, y], this.parameter.Frequency, this.parameter.Translation);
			return c.FromHSV(a[0]*360 / 255.0, 1, 1);
		}
	}

	public class red_gold : Coloring
	{
		public override Color GetColor(int x, int y)
		{
			base.GetColor(x, y);
			byte[] a = GetBytes_3(this.data.iterations[x, y], this.fractalParameter.Iterations, this.data.routeLength[x, y], this.parameter.Frequency, this.parameter.Translation);
			return Color.FromArgb(255, a[0], a[1], a[2]);
		}
	}

	public class red_yellow : Coloring
	{
		public override Color GetColor(int x, int y)
		{
			base.GetColor(x, y);
			byte[] a = GetBytes_2(this.data.iterations[x, y], this.fractalParameter.Iterations, this.data.routeLength[x, y], this.parameter.Frequency, this.parameter.Translation);
			return Color.FromArgb(255, a[0], a[1], 0);
		}
	}
}
